import React, { Component } from 'react'
import { Form, Divider, Input, Row, Col, Button, Tabs, Table, Modal, Cascader, Select, DatePicker } from 'antd'
import { withRouter } from 'react-router-dom'
import * as utils from '../../../utils/action';
import * as APIService from '../../../axios/api_px';
import axios from 'axios'

const { TabPane } = Tabs
const { confirm } = Modal;
const { Option } = Select
class DesignReport extends Component {
    constructor(props) {
        super(props)
        this.state = {
            arr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
            printData: {},
            tableData: [
                { code1: '预制构件的质量', code2: '', code3: '', code4: '第9.2.1条', min: '/', value: '质量证明文件齐全，有效', percent: '√', },
                { code1: '预制构件结构性能检验	', code2: '', code3: '', code4: '	第9.2.2条', min: '', value: '试验合格', percent: '', },
                { code1: '预制构件的外观质量不应有严重缺陷，且不应有影响结构性能和安装、使用功能的尺寸偏差', code2: '', code3: '', code4: '	第9.2.3条', min: '', value: '', percent: '', },
                { code1: '预埋件、预留插筋、预埋管线等的规格和数量以及预留孔、预留洞的数量应符合设计要求', code2: '', code3: '', code4: '	第9.2.4条', min: '', value: '', percent: '', },
                { code1: '预制构件应有标识', code2: '', code3: '', code4: '	第9.2.5条', min: '', value: '', percent: '', },
                { code1: '预制构件的外观质量不应有一般缺陷', code2: '', code3: '', code4: '	第9.2.6条', min: '', value: '', percent: '', },
                { code1: '长度', code2: '楼板、梁、柱、桁架', code3: '＜12m', code4: '±5mm', min: '', value: '', percent: '', },
                { code1: '长度', code2: '楼板、梁、柱、桁架', code3: '≥12m且＜18m', code4: '±10mm', min: '', value: '', percent: '', },
                { code1: '长度', code2: '楼板、梁、柱、桁架', code3: '≥18m', code4: '±20mm', min: '', value: '', percent: '', },
                { code1: '长度', code2: '墙板', code3: '', code4: '±4mm', min: '', value: '', percent: '', },
                { code1: '宽度、高（厚）度', code2: '楼板、梁、柱、桁架', code3: '', code4: '±5mm', min: '', value: '', percent: '', },
                { code1: '宽度、高（厚）度', code2: '墙板', code3: '', code4: '±4mm', min: '', value: '', percent: '', },
                { code1: '表面平整度', code2: '楼板、梁、柱、墙板内表面', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '表面平整度', code2: '墙板外表面', code3: '', code4: '3mm', min: '', value: '', percent: '', },
                { code1: '侧向弯曲', code2: '楼板、梁、柱', code3: '', code4: 'L/750且≤20(L=1000mm)', min: '', value: '', percent: '', },
                { code1: '侧向弯曲', code2: '墙板、桁架', code3: '', code4: 'L/1000且≤20(L=1000mm)', min: '', value: '', percent: '', },
                { code1: '翘曲', code2: '楼板', code3: '', code4: 'L/750(L=1000mm)', min: '', value: '', percent: '', },
                { code1: '翘曲', code2: '墙板', code3: '', code4: 'L/1000(L=1000mm)', min: '', value: '', percent: '', },
                { code1: '对角线', code2: '楼板', code3: '', code4: '10mm', min: '', value: '', percent: '', },
                { code1: '对角线', code2: '墙板', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '预留孔', code2: '中心线位置', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '预留孔', code2: '孔尺寸', code3: '', code4: '±5mm', min: '', value: '', percent: '', },
                { code1: '预留洞', code2: '中心线位置', code3: '', code4: '10mm', min: '', value: '', percent: '', },
                { code1: '预留洞', code2: '洞口尺寸、深度', code3: '', code4: '±10mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋板中心线位置', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋板与混凝土面平面高差', code3: '', code4: '0,-5mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋螺栓', code3: '', code4: '2mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋螺栓外露长度', code3: '', code4: '+10mm,-5mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋套筒、螺母中心线位置', code3: '', code4: '2mm', min: '', value: '', percent: '', },
                { code1: '预埋件', code2: '预埋套筒、螺母与混凝土面平面高差', code3: '', code4: '±5mm', min: '', value: '', percent: '', },
                { code1: '预留插筋', code2: '中心线位置', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '预留插筋', code2: '外露长度', code3: '', code4: '+10mm,-5mm', min: '', value: '', percent: '', },
                { code1: '键槽', code2: '中心线位置', code3: '', code4: '5mm', min: '', value: '', percent: '', },
                { code1: '键槽', code2: '长度、宽度', code3: '', code4: '±5mm', min: '', value: '', percent: '', },
                { code1: '键槽', code2: '深度', code3: '', code4: '±10mm', min: '', value: '', percent: '', },
                { code1: '预制构件的粗糙面的质量及间操的数量应符合设计要求', code2: '', code3: '', code4: '第9.2.8条', min: '', value: '', percent: '', },
            ],
            tableArr: [],
            rowNum: 14,
        }
    }

    componentDidMount() {
        let detailData = this.props.detailData
        let { tableData, arr } = this.state
        detailData = []
        // console.log(detailData, 'detailData-------------')
        for (let i = 0; i < tableData.length; i++) {
            let item = tableData[i]
            // item.min = detailData.qualifiedListNew[i].min
            // item.value = detailData.qualifiedListNew[i].value
            // item.percent = detailData.qualifiedListNew[i].percent

            let flag = item.code4.indexOf('第') != -1
            let number = flag ? item.code4.split('第')[1].split('条') : '9.2.7'
            let project = item.code1 + (item.code2 && '/' + item.code2) + (item.code3 && '/' + item.code3) + (flag ? '/' + item.code4 : '[' + item.code4 + ']')
            detailData.dataList && detailData.dataList.map(it => {
                if (project == it.item) {
                    item.code8 = it.list
                }
            })

        }
        console.log(tableData)

        let tableArr = []
        tableData.map((item, index) => {
            // console.log(item)
            let flag = item.code4.indexOf('第') != -1
            let number = flag ? item.code4.split('第')[1].split('条')[0] : '9.2.7'
            let project = item.code1 + (item.code2 && '/' + item.code2) + (item.code3 && '/' + item.code3) + (flag ? '/' + item.code4 : '[' + item.code4 + ']')

            if (item.value && item.value.replace(/\s*/g, "") != '/') {
                if (item.code8) {
                    let count = Math.ceil(item.code8.length / 10)
                    let arr1 = Array.from(Array(count), (v, k) => k)
                    arr1.map((item1, index1) => {
                        let obj = {
                            number,
                            project: index1 == 0 ? project : '同上',
                            useLocation: detailData.useLocation,
                            list: [],
                        }
                        arr.map((item2, index2) => {
                            obj.list.push(item.code8[index2 + index1 * 10] ? { type: item.code8[index2 + index1 * 10].type, value: item.code8[index2 + index1 * 10].value.toString() } : '')
                        })
                        tableArr.push(obj)
                    })
                } else {
                    let obj = {
                        number,
                        project,
                        useLocation: detailData.useLocation,
                        list: [],
                    }
                    tableArr.push(obj)
                }

            }
        })
        console.log(tableArr, 'tableArr------------------------')

        this.setState({ printData: detailData, tableData, tableArr })
    }
    printReport = () => {
        window.document.body.innerHTML = window.document.getElementById('Proportion').innerHTML;
        window.print();
        window.location.reload();
    }
    render() {
        const { printData, tableData, arr, tableArr, rowNum } = this.state


        let total = Math.ceil(tableArr.length / this.state.rowNum)
        let pages = Array.from(Array(total), (v, k) => k)
        let row = Array.from(Array(this.state.rowNum), (v, k) => k)
        return (
            <div>
                <Button type='primary' onClick={this.printReport} style={{ float: 'right' }}>打印</Button>
                <div style={{ width: 1000, margin: 'auto', fontSize: 10, color: '#000', overflow: 'auto' }} id='Proportion'>
                    
                    <div style={{ width: '90%', margin: 'auto', height: '100%' }}>
                        <Row>
                            <Col>
                                <div style={{ color: '#000' }}>甬统表C01-45-2</div>
                            </Col>
                        </Row>
                        <Row style={{ textAlign: 'center', fontWeight: 'bold' }}>
                            <Col>
                                <h2>装配式结构预制构件检验批质量验收记录表</h2>
                            </Col>
                        </Row>
                        <Row style={{ marginBottom: 10 }}>
                            <Col>
                                <div style={{ letterSpacing: 5 }}>
                                    <span style={{ float: 'right' }}>
                                        <div style={{ borderBottom: '1px solid #333', width: '100%', textAlign: 'center', display: 'inline-block' }} >
                                            {printData.inspectionLotNo}
                                        </div>
                                    </span>
                                </div>
                                <div>
                                    <table style={{ width: '100%', border: '1px solid #000', color: '#000' }} border='1' cellPadding='0' cellSpacing="0">
                                        <tbody>
                                            <tr>
                                                <td style={{ width: 30, border: 'none' }}></td>
                                                <td style={{ width: 30, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>单位(子单位)<br />工程名称</td>
                                                <td colSpan="3" style={{ textAlign: 'center' }}>
                                                    {printData.projectName}
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>分部(子单位)<br />工程名称</td>
                                                <td colSpan="3" style={{ textAlign: 'center' }}>
                                                    主体结构(装配式结构)
                                                </td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>分项工程名称</td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                    装配式结构
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    检验批部位
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>
                                                    {printData.useLocation}
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    检验批容量
                                                </td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                    <span id='capacity'>{printData.componentNum}</span>件
                                                </td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>施工单位</td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                    {printData.constructionUnit}
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    项目负责人
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    项目质量员
                                                </td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                </td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>分包单位</td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    分包单位<br />项目负责人
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    分包单位<br />项目质量员
                                                </td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                </td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>施工依据</td>
                                                <td colSpan="3" style={{ textAlign: 'center' }}>
                                                    《混凝土结构施工规范》<br />GB 50666-2011
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>
                                                    验收依据
                                                </td>
                                                <td colSpan="3" style={{ textAlign: 'center' }}>
                                                    装配整体式混凝土结构工程施工质量验收规范<br />DB33/T 1123-2016
                                                </td>
                                            </tr>
                                            <tr style={{ height: 22 }}>
                                                <td colSpan='6' style={{ textAlign: 'center' }}>施工质量验收规程的规定</td>
                                                <td colSpan="2" style={{ textAlign: 'center' }}>
                                                    最小/实际<br />抽样数量
                                                </td>
                                                <td colSpan='3' style={{ textAlign: 'center' }}>
                                                    施工单位检查记录
                                                </td>
                                                <td style={{ textAlign: 'center' }}>
                                                    检查结果
                                                </td>
                                            </tr>

                                            {
                                                tableData.map((item, index) => {
                                                    if (index == 0) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='4' style={{ textAlign: 'center' }}>主<br />控<br />项<br />目</td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                1
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件的质量
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.1条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 1) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td style={{ textAlign: 'center' }}>
                                                                2
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件结构性能检验
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.2条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 2) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td style={{ textAlign: 'center' }}>
                                                                3
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件的外观质量不应有严重缺陷，且不应有影响结构性能和安装、使用功能的尺寸偏差
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.3条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 3) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td style={{ textAlign: 'center' }}>
                                                                4
                                                            </td>
                                                            <td colSpan='3'>
                                                                预埋件、预留插筋、预埋管线等的规格和数量以及预留孔、预留洞的数量应符合设计要求
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.4条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 4) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='14' style={{ textAlign: 'center' }}>一<br />般<br />项<br />目</td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                1
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件应有标识
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.5条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 5) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td style={{ textAlign: 'center' }}>
                                                                2
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件的外观质量不应有一般缺陷
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.6条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 6) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='4' style={{ textAlign: 'center' }}>
                                                                3
                                                            </td>
                                                            <td rowSpan='4' style={{ textAlign: 'center' }}>
                                                                长度
                                                            </td>
                                                            <td rowSpan='3' style={{ textAlign: 'center' }}>
                                                                楼板、梁、柱、桁架
                                                            </td>
                                                            <td>
                                                                ＜12m
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 7) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td>
                                                                ≥12m且＜18m
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±10mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 8) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td>
                                                                ≥18m
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±20mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 9) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td colSpan='2'>
                                                                墙板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±4mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 10) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                4
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                宽度、高（厚）度
                                                            </td>
                                                            <td colSpan='2'>
                                                                楼板、梁、柱、桁架
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 11) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td colSpan='2'>
                                                                墙板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±4mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 12) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                5
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                表面平整度
                                                            </td>
                                                            <td colSpan='2'>
                                                                楼板、梁、柱、墙板内表面
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 13) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td colSpan='2'>
                                                                墙板外表面
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                3mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 14) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                6
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                侧向弯曲
                                                            </td>
                                                            <td colSpan='2'>
                                                                楼板、梁、柱
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                L/750且≤20<br />(L=1000mm)
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 15) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td colSpan='2'>
                                                                墙板、桁架
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                L/1000且≤20<br />(L=1000mm)
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 16) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                7
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                翘曲
                                                            </td>
                                                            <td colSpan='2'>
                                                                楼板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                L/750<br />(L=1000mm)
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 17) {
                                                        return <tr style={{ height: 35 }}>
                                                            <td colSpan='2'>
                                                                墙板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                L/1000<br />(L=1000mm)
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else {
                                                        return null
                                                    }
                                                })
                                            }
                                        </tbody>
                                    </table>
                                </div>
                            </Col>
                        </Row>
                    </div>
                    <div style={{ width: '90%', margin: 'auto', height: '100%' }}>
                        <Row>
                            <Col>
                                <div style={{ color: '#000' }}>甬统表C01-45-2</div>
                            </Col>
                        </Row>
                        <Row style={{ textAlign: 'center', fontWeight: 'bold' }}>
                            <Col>
                                <h2>装配式结构预制构件检验批质量验收记录表</h2>
                            </Col>
                        </Row>
                        <Row style={{ marginBottom: 10 }}>
                            <Col>
                                <div style={{ letterSpacing: 5 }}>
                                    <span style={{ float: 'right' }}>
                                        <div style={{ borderBottom: '1px solid #333', width: '100%', textAlign: 'center', display: 'inline-block' }} >
                                            {printData.inspectionLotNo}
                                        </div>
                                    </span>
                                </div>
                                <div>
                                    <table style={{ width: '100%', border: '1px solid #000', color: '#000' }} border='1' cellPadding='0' cellSpacing="0">
                                        <tbody>
                                            <tr>
                                                <td style={{ width: 30, border: 'none' }}></td>
                                                <td style={{ width: 30, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 50, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                                <td style={{ width: 100, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                                <td style={{ width: 80, border: 'none' }}></td>
                                            </tr>
                                            {
                                                tableData.map((item, index) => {
                                                    if (index == 18) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='18' style={{ textAlign: 'center' }}>一<br />般<br />项<br />目</td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                8
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                对角线
                                                            </td>
                                                            <td colSpan='2'>
                                                                楼板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                10mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 19) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                墙板
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 20) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                9
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                预留孔
                                                            </td>
                                                            <td colSpan='2'>
                                                                中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 21) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                孔尺寸
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 22) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                10
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                预留洞
                                                            </td>
                                                            <td colSpan='2'>
                                                                中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                10mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 23) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                洞口尺寸、深度
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±10mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 24) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='6' style={{ textAlign: 'center' }}>
                                                                11
                                                            </td>
                                                            <td rowSpan='6' style={{ textAlign: 'center' }}>
                                                                预埋件
                                                            </td>
                                                            <td colSpan='2'>
                                                                预埋板中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 25) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                预埋板与混凝土面平面高差
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                0，-5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 26) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                预埋螺栓
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                2mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 27) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                预埋螺栓外露长度
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                +10mm，-5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 28) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                预埋套筒、螺母中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                2mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 29) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                预埋套筒、螺母与混凝土面平面高差
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 30) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                12
                                                            </td>
                                                            <td rowSpan='2' style={{ textAlign: 'center' }}>
                                                                预留插筋
                                                            </td>
                                                            <td colSpan='2'>
                                                                中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 31) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                外露长度
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                +10mm，-5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 32) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td rowSpan='3' style={{ textAlign: 'center' }}>
                                                                13
                                                            </td>
                                                            <td rowSpan='3' style={{ textAlign: 'center' }}>
                                                                键槽
                                                            </td>
                                                            <td colSpan='2'>
                                                                中心线位置
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 33) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                长度、宽度
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±5mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 34) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td colSpan='2'>
                                                                深度
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                ±10mm
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else if (index == 35) {
                                                        return <tr style={{ height: 40 }}>
                                                            <td style={{ textAlign: 'center' }}>
                                                                14
                                                            </td>
                                                            <td colSpan='3'>
                                                                预制构件的粗糙面的质量及间操的数量应符合设计要求
                                                            </td>
                                                            <td style={{ textAlign: 'center' }}>
                                                                第9.2.8条
                                                            </td>
                                                            <td colSpan='2' style={{ textAlign: 'center' }}>{item.min}</td>
                                                            <td colSpan='3' style={{ textAlign: 'center' }}>{item.value}</td>
                                                            <td style={{ textAlign: 'center' }}>{item.percent}</td>
                                                        </tr>
                                                    } else {
                                                        return null
                                                    }
                                                })
                                            }

                                            <tr style={{ height: 32 }}>
                                                <td colSpan="4" rowSpan='3' style={{ textAlign: 'center' }}>施工单位<br />检查结果</td>
                                                <td colSpan='8' style={{ border: 'none', textAlign: 'center' }}>合格</td>
                                            </tr>
                                            <tr style={{ height: 32 }}>
                                                <td colSpan='8' style={{ border: 'none' }}>项目施工员：</td>
                                            </tr>
                                            <tr style={{ height: 32 }}>
                                                <td colSpan='5' style={{ border: 'none' }}>项目质量员：</td>
                                                <td colSpan='3' style={{ border: 'none', textAlign: 'right' }}>&emsp;&emsp;年&emsp;&emsp;月&emsp;&emsp;日</td>
                                            </tr>
                                            <tr style={{ height: 32 }}>
                                                <td colSpan="4" rowSpan='3' style={{ textAlign: 'center' }}>监理（建设）<br />单位验收结论</td>
                                                <td colSpan='8' style={{ border: 'none', borderTop: '1px solid #000', textAlign: 'center' }}></td>
                                            </tr>
                                            <tr style={{ height: 32 }}>
                                                <td colSpan='8' style={{ border: 'none' }}>专业监理工程师：</td>
                                            </tr>
                                            <tr style={{ height: 32 }}>
                                                <td colSpan='5' style={{ border: 'none' }}>（建设单位项目专业技术负责人）：</td>
                                                <td colSpan='3' style={{ border: 'none', textAlign: 'right' }}>&emsp;&emsp;年&emsp;&emsp;月&emsp;&emsp;日</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </Col>
                        </Row>
                    </div>
                </div>
            </div>
        )
    }
}

export default Form.create()(withRouter(DesignReport))